Skip to content

Conversation

@bennycode
Copy link

Hello,

as promised here are the changes to have your "observableDictionary" as a Bower dependency. This commit includes a Bower package description (bower.json) and a Grunt configuration (package.json & Gruntfile.js).

All you need to do now is installing "node.js" (http://nodejs.org/). If you have "node" then you can install Grunt via the command-line with: npm install -g grunt-cli and Bower with npm install -g bower.

If you have grunt installed then you should go to your project via command-line and execute:

npm install
bower install

These two commands will resolve external dependencies (like Knockout). You can then open the index.html file to see if the needed dependencies have been resolved. :)

If you want to create a package for distribution of your plugin, then just run:

grunt default

Grunt will package your plugin to the "dist" folder including the source files, a minified version and a source-code mapping file. :) If you are happy with that, then just create a new Version of your plugin on GitHub and release it as a Bower package, using:

bower init
bower register knockout.observableDictionary git://github.com/jamesfoster/knockout.observableDictionary.git

Feel free to contact me if there are any problems!

More information:

@bennycode bennycode mentioned this pull request Jun 20, 2014
@lipis
Copy link

lipis commented Jun 20, 2014

Awesome!

bower.json Outdated
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for empty stuff

@bennidi
Copy link

bennidi commented Nov 10, 2014

Please update your docs because bower complains about camel case notation of package name. It will produce an error EINVFORMAT Invalid URL format for the install command:

bower register knockout.observableDictionary git://github.com/jamesfoster/knockout.observableDictionary.git

Instead use:

bower register knockout.dictionary git://github.com/jamesfoster/knockout.observableDictionary.git

Also see http://stackoverflow.com/questions/25387908/unable-to-register-bower-package-einvformat
It is also possible to add the dependency to the bower.json referencing the git repository location like this

{
  "name": "some project",
  "dependencies": {
    "knockout-dict": "git://github.com/jamesfoster/knockout.observableDictionary.git"
  }
}

@bennycode
Copy link
Author

@bennidi - Thanks for the info! I updated the package.json and bower.json file with a package name which doesn't use camelCase. But @jamesfoster still needs to merge my pull request. Otherwise this change will be only available in my fork: https://github.com/bennyn/knockout.observableDictionary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants